package me.sdevil507.org.po;


import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import me.sdevil507.supports.jpa.BaseJpaSnowflakeIdAndAuditEntity;

import javax.persistence.*;

/**
 * 机构关键词表[ServicesKeywordPo]
 *
 * @author sdevil507
 * created on 2020-07-14 10:47:43
 */
@Entity
@Table(name = "biz_org_keyword")
@Data
@EqualsAndHashCode(callSuper = true, exclude = "org")
@ToString(exclude = "org")
public class OrgKeywordPo extends BaseJpaSnowflakeIdAndAuditEntity {

    /**
     * 关键词
     */
    @Column
    private String name;

    /**
     * 所属机构
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "org_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    @org.hibernate.annotations.ForeignKey(name = "none")
    private OrgPo org;

}